// 解构表达式
console.log('========== 解构表达式 ==========');
// 数组解构
let nums = [22, 34, 67];
let [num1, num2, num3] = nums;
console.log(num1, num2, num3);

// demo2
let [[n1, n2, n3], Test03_str, time] = [nums, 'ABC', new Date().toLocaleString()];
console.log(n1, n2, n3);
console.log(Test03_str);
console.log(time);

// 对象解构
let user = {
    name: 'zs',
    age: 22,
    address: ['hn', 'js']
}

let {name, age, address} = user;
console.log(name);
console.log(age);
console.log(address);